<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
		<meta name="misapplication-tap-highlight" content="no" />
		<meta name="HandheldFriendly" content="true" />
		<meta name="MobileOptimized" content="320" />
		<title>home-乐谱</title>
		<link rel="stylesheet" href="../css/mui.min.css" />
		<link rel="stylesheet" href="../css/base.css" />
		<style>
			.mui-control-content {
				height: 100%;
				background: white;
			}
			
			.mui-control-content .mui-loading {
				margin-top: 50px;
			}
			
			.mui-segmented-control.mui-segmented-control-inverted .mui-control-item {
				color: black;
			}
			
			.mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active {
				color: #00D5C5;
			}
			
			.containers {
				padding: 10px;
			}
			
			.containers .left {
				width: 70px;
			}
			
			.containers .right {
				width: 70px;
			}
			
			.btn {
				background: #00D5C5;
				color: white;
				border: none;
			}
			
			.mui-table-view li {
				padding: 0px;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">乐谱</h1>
			<a class="mui-btn mui-btn-blue mui-btn-link mui-pull-right">
				<img onclick="goNew()" src="../img/upload.png" style="width: 40px;margin-right: 10px;" />
				<img onclick="searchs()" src="../img/search-w.png" style="width: 40px;" />
			</a>
		</header>
		<div class="mui-content fill-all flex">
			<div id="slider" class="mui-slider flex-1 flex v-flex">
				<div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
					<a class="mui-control-item mui-active" href="#item1mobile">
						古典
					</a>
					<a class="mui-control-item" href="#item2mobile">
						流行
					</a>
					<a class="mui-control-item" href="#item3mobile">
						轻音乐
					</a>
					<a class="mui-control-item" href="#item4mobile">
						双钢琴
					</a>
					<a class="mui-control-item" href="#item5mobile">
						四手联弹
					</a>
				</div>
				<div id="sliderProgressBar" class="" style="height:1px;background: #00D5C5;width: 20%;"></div>
				<div class="flex-1 mui-slider-group">
					<div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
						<div id="scroll1" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										<div class="flex containers">
											<div onclick="goDetail()" class="left">
												<img src="../img/book-fengmian.png" class="fill-w" />
											</div>
											<div class="flex-1 flex v-flex">
												<h4 class="flex-1 flex v-center">书名</h4>
												<h4 class="flex-1 flex v-center">书名</h4>
											</div>
											<div class="right flex v-center h-center">

												<button class="btn">打赏</button>
											</div>
										</div>
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-2
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-3
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-4
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-5
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-6
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-7
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-8
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-9
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-10
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-11
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-12
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-13
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-14
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-15
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-16
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-17
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-18
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-19
									</li>
									<li class="mui-table-view-cell">
										第一个选项卡子项-20
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div id="item2mobile" class="mui-slider-item mui-control-content">
						<div id="scroll2" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<div class="mui-loading">
									<div class="mui-spinner">
									</div>
								</div>
							</div>
						</div>

					</div>
					<div id="item3mobile" class="mui-slider-item mui-control-content">
						<div id="scroll3" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<div class="mui-loading">
									<div class="mui-spinner">
									</div>
								</div>
							</div>
						</div>

					</div>
					<div id="item4mobile" class="mui-slider-item mui-control-content">
						<div id="scroll4" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<div class="mui-loading">
									<div class="mui-spinner">
									</div>
								</div>
							</div>
						</div>

					</div>
					<div id="item5mobile" class="mui-slider-item mui-control-content">
						<div id="scroll5" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<div class="mui-loading">
									<div class="mui-spinner">
									</div>
								</div>
							</div>
						</div>

					</div>
				</div>
			</div>

		</div>
		<script type="text/javascript" src="../js/mui.min.js"></script>
		<script>
			(function($) {
					$('.mui-scroll-wrapper').scroll({
						indicators: true //是否显示滚动条
					});
					var html2 = '<ul class="mui-table-view"><li class="mui-table-view-cell">第二个选项卡子项-1</li><li class="mui-table-view-cell">第二个选项卡子项-2</li><li class="mui-table-view-cell">第二个选项卡子项-3</li><li class="mui-table-view-cell">第二个选项卡子项-4</li><li class="mui-table-view-cell">第二个选项卡子项-5</li></ul>';
					var html3 = '<ul class="mui-table-view"><li class="mui-table-view-cell">第三个选项卡子项-1</li><li class="mui-table-view-cell">第三个选项卡子项-2</li><li class="mui-table-view-cell">第三个选项卡子项-3</li><li class="mui-table-view-cell">第三个选项卡子项-4</li><li class="mui-table-view-cell">第三个选项卡子项-5</li></ul>';
					var html4 = '<ul class="mui-table-view"><li class="mui-table-view-cell">第4个选项卡子项-1</li><li class="mui-table-view-cell">第4个选项卡子项-2</li><li class="mui-table-view-cell">第4个选项卡子项-3</li><li class="mui-table-view-cell">第4个选项卡子项-4</li><li class="mui-table-view-cell">第4个选项卡子项-5</li></ul>';
					var html5 = '<ul class="mui-table-view"><li class="mui-table-view-cell">第5个选项卡子项-1</li><li class="mui-table-view-cell">第5个选项卡子项-2</li><li class="mui-table-view-cell">第5个选项卡子项-3</li><li class="mui-table-view-cell">第5个选项卡子项-4</li><li class="mui-table-view-cell">第5个选项卡子项-5</li></ul>';
					var item2 = document.getElementById('item2mobile');
					var item3 = document.getElementById('item3mobile');
					var item4 = document.getElementById('item4mobile');
					var item5 = document.getElementById('item5mobile');
					document.getElementById('slider').addEventListener('slide', function(e) {
						var selects = e.detail.slideNumber;
						document.getElementById("sliderProgressBar").style.marginLeft = (selects * 20) + "%";
						if(selects === 1) {
							if(item2.querySelector('.mui-loading')) {
								setTimeout(function() {
									item2.querySelector('.mui-scroll').innerHTML = html2;
								}, 500);
							}
						} else if(selects === 2) {
							if(item3.querySelector('.mui-loading')) {
								setTimeout(function() {
									item3.querySelector('.mui-scroll').innerHTML = html3;
								}, 500);
							}
						} else if(selects === 3) {
							if(item4.querySelector('.mui-loading')) {
								setTimeout(function() {
									item4.querySelector('.mui-scroll').innerHTML = html4;
								}, 500);
							}
						} else if(selects === 4) {
							if(item5.querySelector('.mui-loading')) {
								setTimeout(function() {
									item5.querySelector('.mui-scroll').innerHTML = html5;
								}, 500);
							}
						}
					});
				}

			)(mui);
			mui.plusReady(function() {
					mui("ul li").on("tap", "button", function() {
						mui.openWindow({
							url: "book-detail.html",
							extras: {
								uids: "1"
							}
						});
					});
				}

			);
			function goDetail(){
				mui.openWindow({
					url: "yuepu-detail.html"
				});
			}
			function goNew() {
				mui.openWindow({
					url: "yuepu-new.html"
				});
			}

			function searchs() {
				mui.openWindow({
					url: "yuepu-search.html"
				});
			}
		</script>
	</body>

</html>